<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="/templates/principal.xhtml">

	<ui:define name="corpo">

		<div id="top">
			<h:form>
				<ul id="nav" style="FONT-FAMILY: 'Century Schoolbook L';">

					<li><h:panelGrid columns="2">
							<h:commandLink action="/publico/login.xhtml" value=" Login " />
						</h:panelGrid></li>


					<li><h:panelGrid columns="2">
							<h:commandLink action="#{fornecedorBean.novo}"
								value=" Registre-se">
							</h:commandLink>
						</h:panelGrid></li>

					<li><h:panelGrid columns="2">
							<h:commandLink action="/publico/faleconosco.xhtml"
								value=" Fale conosco" />
						</h:panelGrid></li>

					<li><h:panelGrid columns="2">
							<h:commandLink action="/publico/principal.xhtml" value=" Home">
							</h:commandLink>
						</h:panelGrid></li>

				</ul>
			</h:form>
		</div>

		<div id="login">
		
		<div style="float: left;width: 400;" >

			<br />
			<div id="imgLoginLogo">
				<h:graphicImage library="imagens" name="logo.png" height="200" />
			</div>
			
			</div>

        <div style="float: left;width: 400;">
			<h1>Efetuar Login WebSec</h1>
			<h:panelGroup rendered="#{!empty param.login_error}">
					<div id="login_erro">
						<span>Erro ao efetuar o login</span> <br /> Usuário ou senha
						inválido<br />
						
					</div>
				</h:panelGroup>

			

				

				<form id="form_login" method="post"
					action="#{request.contextPath}/j_spring_security_check">
					<div id="formulario_login" >
					<table>
						<tr>
							<td>Login</td>
							<td><input type='text' name='j_username'  style="width: 300px;"></input></td>
						</tr>
						<tr>
							<td>Senha</td>
							<td><input type='password' name='j_password'  style="width: 300px;"></input></td>
						</tr>						
						<tr>
							<td></td>
							<td><input type='submit' value="Entrar"  class="button_login"     ></input></td>
						</tr>						
						<tr>
							<td align="right"><input type='checkbox'
								name='_spring_security_remember_me'></input></td>
							<td style="font-weight: normal; color: #000">Entrar automaticamente</td>
						</tr>
					</table>
					</div>

					<script>
					document.getElementById("form_login").j_username.value="#{SPRING_SECURITY_LAST_USERNAME}";
				</script>
				</form>
				
			
			<br />
</div>
		</div>
	</ui:define>
</ui:composition>
</html>